﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;

using OfficialWeb.Core;

using OOS.Core.User;

namespace OfficialWeb.Application
{
    public static class JWTToken
    {
        /// <summary>
        /// 获取登录人的信息
        /// </summary>
        /// <returns></returns>
        public static UserBasic GetUser()
        {
            return new UserBasic() { 
                Id = int.Parse(App.User?.FindFirstValue(nameof(UserBasic.Id)))
            };
        }
    }
}
